//2009/08/29 19:46:26
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class TrueSpace
{
public:
    long long calculateSpace(vector <int> sizes, int clusterSize)
    {
		long long ret = 0;
		for(int i=0; i<sizes.size(); i++)
		{
			ret += (long long) ((sizes[i] + clusterSize-1) / clusterSize);
		}
		return ret * clusterSize;
    }
};
